# Required Vars:
# ${APP_NAME}
# ${PROG_SOURCES}
# ${PROG_HEADERS}

SET(INSTALL_INCDIR include)
SET(INSTALL_BINDIR bin)
IF(WIN32)
    SET(INSTALL_LIBDIR bin)
    SET(INSTALL_ARCHIVEDIR lib)
ELSE(WIN32)
    SET(INSTALL_LIBDIR lib${LIB_POSTFIX})
    SET(INSTALL_ARCHIVEDIR lib${LIB_POSTFIX})
    SET(INSTALL_FRAMEWORKDIR Frameworks)
ENDIF(WIN32)

SET(HEADERS_GROUP "Header Files")

SOURCE_GROUP(
    ${HEADERS_GROUP}
    FILES ${PROG_HEADERS}
)

IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
   HANDLE_MSVC_DLL()
ENDIF(MSVC AND OSG_MSVC_VERSIONED_DLL)


INSTALL(
  TARGETS ${APP_NAME}
  RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT yds
  LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT yds
  FRAMEWORK DESTINATION ${INSTALL_FRAMEWORKDIR} COMPONENT yds
  ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT yds
)
